import request from '@/utils/request'

// 查询服务器列表
export function listHardserver(query) {
  return request({
    url: '/manage/hardserver/list',
    method: 'get',
    params: query
  })
}

// 查询服务器详细
export function getHardserver(id) {
  return request({
    url: '/manage/hardserver/' + id,
    method: 'get'
  })
}

// 新增服务器
export function addHardserver(data) {
  return request({
    url: '/manage/hardserver',
    method: 'post',
    data: data
  })
}

// 修改服务器
export function updateHardserver(data) {
  return request({
    url: '/manage/hardserver',
    method: 'put',
    data: data
  })
}

// 删除服务器
export function delHardserver(id) {
  return request({
    url: '/manage/hardserver/' + id,
    method: 'delete'
  })
}

//获取服务器信息
export function getServerInfo(id){
  return request({
    url: '/manage/hardserver/getServerInfo/' + id,
    method: 'get'
  })
}